package com.yricky.atri.utils.yolov5

import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint

/**
 * @author Yricky
 * @date 2022/1/9
 */
fun Bitmap.label(results:List<Recognition>){
    val paint = Paint().apply {
        color = Color.argb(0.3f,1f,0f,0f)
    }
    Canvas(this).apply {
        results.forEach {
            drawRect(it.location,paint)
        }
    }
}